package com.lzx.adx.report.enums;

/**
 * 58和媒体趣头条回调类型映射
 */
public enum YyHwEnum {
    activate("android_activate", "activate"),
    register("android_register", "register"),
    day1retention("android_day1retention", "retain"),
    addtocart("android_addtocart", "paid"),
    ;

    private String productCode;

    private String hwCode;


    YyHwEnum(String productCode, String hwCode) {
        this.productCode = productCode;
        this.hwCode = hwCode;

    }

    public String getProductCode() {
        return productCode;
    }

    public String getHwCode() {
        return hwCode;
    }


    public static String getHwCode(String productCode) {
        YyHwEnum[] yyHwEnums = YyHwEnum.values();
        for (YyHwEnum yyHwEnum : yyHwEnums) {
            if (yyHwEnum.getProductCode().equals(productCode)) {
                return yyHwEnum.getHwCode();
            }
        }
        return null;
    }

}
